<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="../Public/js/jquery-1.7.1.min.js"></script>
<title>图片显示</title>
<style>
body {
	background:#ffffff;
	margin:0px;	
}
a{
    text-decoration: none;
    color:#7f7f7f;
}
div{
	margin:0px;
	margin-left:auto;
	margin-right:auto;
	/*border:solid ;
	border-color:#Ff0000;*/
	}
.tab{
	border:thin solid #d0d0d0;
	float:left;
	height:39px;
	border-bottom:none;
	line-height:39px;
	font-size:16px;
	color:#626262;
	text-align:center;
	width:80px;
	font-weight:bold;
	cursor:pointer;
	}	
.setab{
	background:#d8f3fe;
	color:#1f9692;
	}	
.one{
    float: left;
    margin-left: 10px;
    height:50px; 
    font-size: 12pt;
}    
 .options{
	height:30px;
	width:170px;
	border-bottom:dotted #e3e3e3 1px;
	cursor:pointer;
	} 
 .myfontstyle{
    font-family:'黑体';
    letter-spacing:1px;
} 
</style>
</head>
<script type="text/javascript">
$(document).ready(function(){  
    $("#comm").keydown(function(){  
        var curLength=$("#comm").val().length;   
        if(curLength>=70){  
            var num=$("#comm").val().substr(0,70);  
            $("#comm").val(num);  
            alert("超过字数限制，多出的字将被截断!");  
        }  
        else{  
            var no = $("#comm").val().length;
            no=no+"/70";
            $("#textCount").text(no);  
        }  
    })  
});
function addPhotoData(){
    var phoid = $("#photoId").val();
    var comm = $("#comm").val();
    $('#commpart').css('display','block');
    $.post("{:U('Upload/addPhotoComment')}",{phcomment:comm,photoid:phoid},function(data){
        if(data!=null){
         var url = "fullshow/picid/"+phoid;
         window.location.href="{:U('"+url+"')}";
        }
        else{
            alert("添加失败！");
        }
       // var jsonObj = $.parseJSON(data);
//         $('#commpart').append("<div class='one' id='disName' style='width:15%;color:#0000ff;'>"
//         +jsonObj.data['p_name']+"</div><div class='one' id='disContent' style='width:60%;'>"
//         +jsonObj.data['content']+"</div><div class='one' id='disTime' style='width:15%;text-align: right;font-size:6pt;font-style:oblique;'>"
//         +jsonObj.info+"</div>");   
//        $('#comm').attr('value','');
    });
}
 function selectitem(index){
   switch(index){
    case 0:
    window.location.href="{:U('Public/tohome')}"
    break;
    case 1:
    window.location.href="{:U('Upload/uploadpicture')}"
    break;
    case 2:
    window.location.href="{:U('Note/addBlog')}"
    break;
    case 3:
    window.location.href="{:U('First/Index')}"
    break;
    case 4:
    window.location.href="{:U('Favorite/Index')}"
    break;
    case 5:
    window.location.href="{:U('Video/addVideo')}"
    break;
    case 6:
    window.location.href="{:U('Growth/Index')}"
    break;
    case 7:
    window.location.href="{:U('Timeshow/Index')}"
    break;
   }
}   
function deletePicture(picid){
    var url = "deletePicture/picid/"+picid;
    window.location.href = "{:U('"+url+"')}";
}
</script>
<body>
<div class="myfontstyle" style="margin-top:30px;width:100%;">
	<div style="float:left;width:67%;">
  <!--标题栏开始-->  
		<div style="width:90%;height:40px; background:#ecf9fe; border: thin solid #dee3e3; margin-top:10px;">
			<div class="tab setab myfontstyle" style="width:120px;">Tang图片</div>
   		</div>
      <!--标题栏结束-->  
 	 <!--最左区域-->
	<div  style="width:90%;background:#f7fcfe;border-top:none;border:thin solid #dee3e3;">	
<!--讨论题开始-->
 <input type="text" id="photoId" name="photoId" value="{$list.id}" style="display: none;" />
			<div style="width:95%;margin-left:20px;margin-top:10px; ">
            	<div style="width:90%;">
                
                <img src="../Public/upload/{$list.ph_name}" style="width:500px;height:350px;"  alt="{$list.ph_tag}" />
                </div>
            </div>
   
<!--讨论题结束-->
<!--详细介绍开始-->
			<div style="width:95%;margin-left:20px;">
            	<div style="float:left;width:100%;height:50px;background:url(../Public/discuss/image/line.png) repeat-x left bottom;text-align: center;">
                	<b style="color:#047f80 ;line-height: 50px;">{$list.ph_tag}</b><a style="margin-left:20px;font-size: 10pt; font-style: oblique;line-height: 50px;">{$list.ph_des}</a> 
                </div>
            </div>

<!--评论列表开始-->

			<div style="width:95%;margin-left:20px;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
            	<div style="float:left;width:100%;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
                	
                    <div style="float:right;width:97%;"> 
                     <!--添加评论局部刷新-->
                      <div id="commpart" class="myfontstyle" >
                          <volist name="CommentList" id="vo">
                            <div class="one" style="width:15%;color:#047f80;">{$vo.p_name}</div>
                            <div class="one" style="width:60%;font-size:10pt;">{$vo.content}</div>
                            <div class="one" style="width:15%;text-align: right;font-size:6pt;font-style:oblique;">{$vo.ptime}</div>
                         </volist> 
                         <div class="myfontstyle" id="pageid" style="float:right;width:100%;clear:both;font-size:6pt;text-align:center;height:25px;">{$page}</div>   
                      </div>
                      <!--添加评论局部刷新结束-->                  	
                    </div>
                </div>
            </div>


<!--评论列表结束-->
<!--评论栏开始-->
    
			<div style="width:95%;margin-left:20px;height:60px; clear:both;">
            	<div style="float:left;width:100%">
                	<div style="float:left;width:15%;height:50px;">
                    	<div style="background:url(../Public/discuss/image/review.png) no-repeat;width:61px;height:28px;cursor:pointer;" onclick="addPhotoData()"></div>
                    </div>
                    <div style="float:right;width:85%;height:50px;">                      
                    	<textarea id="comm" name="comm" style="width:95%;height:34px;" ></textarea>
                         <div style="margin-top:2px; float:left;width:45px;height:14px;line-heght:14px;font-size:10pt;text-align:right;color:#9b9b9b;cursor:pointer;"><span id="textCount" class="myfontstyle">0/50</span></div>
              
                    </div>
                </div>
            </div>
  
<!--评论栏结束-->
        </div><!--最左区域-->

   </div><!--内容结束-->
   
<div style="float:left;width:3%;background:url(../Public/discuss/image/m_line.png) no-repeat right center;height:600px; "></div><!--中线-->
<!--公告开始-->
<div style="float:left;width:30%;">
  <div class="myfontstyle" >
   	   <div style="background:url(../Public/photo/image/back.png) no-repeat;width:210px;height:214px;padding-top:50px;">
    <!--	<div class="myfontstyle" style="width:80%;color:#A0A0A0;font-size:10pt;">&nbsp;&nbsp;您可以在这里上传照片，这样的功能并不特殊，您或许已经在网络上传过无数的照片了，
不过，每一张照片都应该有它的专属故事，Tang照片必须是这样的：这张照片的故事我忘不了，它使我想起了那天宝宝…… 
       </div> -->   
    </div>
   </div>
    <div  id="role" style="background:url(../Public/child/image/v_line.png) bottom left repeat-x;width:70%;clear:both;">
    	<div class="options" style="background:url(../Public/child/image/home.png) no-repeat;" onclick="selectitem(0)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addphoto.png) no-repeat;" onclick="selectitem(1)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addvideo.png) no-repeat;" onclick="selectitem(5)"></div>	
    	<div class="options" style="background:url(../Public/child/image/marker.png) no-repeat;" onclick="selectitem(3)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addfavourite.png) no-repeat;" onclick="selectitem(4)"></div>	
    	<div class="options" style="background:url(../Public/child/image/addnote.png) no-repeat;" onclick="selectitem(2)"></div>	
    	<div class="options" style="background:url(../Public/child/image/grow.png) no-repeat;" onclick="selectitem(6)"></div>	
    	<div class="options" style="background:url(../Public/child/image/timeshow.png) no-repeat;" onclick="selectitem(7)"></div>	
    </div>
</div>

<!--公告结束-->
</div><!--全局框结束-->      
<img src="../Public/photo/image/flower.png" style="position:absolute;right:0;bottom:0; z-index:-50;" />	
</body>
</html>